home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
utils
/
wnx1091.lzh
/
XES_DEV2.DOC
< prev
next >
Wrap
Text File
|
1991-08-24
|
11KB
|
307 lines
XES Data Structures
===================
Assembler declaration of an XES parameter block structure:
WNX_id ds.w 1 one word I.D. number
WNX_idname ds.b 16 unique 16 byte identifier
WNX_apid ds.w 1 application I.D. of parent
WNX_grafhandle ds.w 1 graphics handle of parent
WNX_global ds.l 1 ptr to parent's GLOBAL array
WNX_vdiparams ds.l 1 ptr to parent's VDI array
WNX_aesparams ds.l 1 ptr to parent's AES array
WNX_messagebuf ds.l 1 ptr to parent's message buffer
WNX_in ds.w 8 WNX_in array (8 words)
WNX_out ds.w 8 WNX_out array (8 words)
WNX_flags ds.w 1 event flags {a la evnt_multi}
WNX_link ds.l 1 address for resuming execution
WNX_tcount ds.w 1 timer count in 20ms increments
WNX_troutine ds.l 1 address of TIMER routine
WNX_mroutine ds.l 1 address of MESSAGE routine
WNX_broutine ds.l 1 address of BUTTON routine
WNX_kroutine ds.l 1 address of KEYBOARD routine
WNX_rroutine ds.l 1 address of REDRAW routine
WNX_termroutine ds.l 1 address if WNX terminates
C definition of an XES parameter block structure:
typedef struct {
int WNX_id; /* unique WNX application i.d. */
char WNX_idname[16]; /* unique 16 byte identifier */
int WNX_apid; /* application I.D. of parent */
int WNX_grafhandle; /* graf_handle of parent */
long WNX_global; /* ptr to parent's GLOBAL array */
long WNX_vdiparams; /* ptr to parent's VDI array */
long WNX_aesparams; /* ptr to parent's AES array */
long WNX_messagebuf; /* ptr to parent's message buffer */
int WNX_in[8]; /* WNX_in array (8 words) */
int WNX_out[8]; /* WNX_out array (8 words) */
int WNX_flags; /* event flags like evnt_multi */
long WNX_link; /* address for resuming execution */
int WNX_tcount; /* timer count (in 20ms increments) */
void (*WNX_troutine)(); /* ptr to the routine to be run on timer event */
void (*WNX_mroutine)(); /* this is for the message routine */
void (*WNX_broutine)(); /* this is for the left button click routine */
void (*WNX_kroutine)(); /* this is for the keyboard routine */
void (*WNX_rroutine)(); /* this is the for redraws */
void (*WNX_termroutine)(); /* this is when the WNX terminates */
}xesparmblk;
* NOTE: WNX_in is defined in XESBLK.H as an array of 8 words, so
* to access variables, remember that WNX_in+2 in assembler would
* refer to WNX_in(1) in C!
XES Function Calls (8/23/91)
============================
XES_submit:
This allows a WNX written in a high level language to end a routine
without using the low-level assembler RTS function. This function
is NECESSARY at initialization time for the WNX.
C syntax:
xes_submit(&xparmblk)
in: none.
out: none.
XES_init:
Tells Wind-XES the pointer to this application's XES
parameter block.
C syntax:
xes_init(&xparmblk)
in: d1 = ptr to new parmblk.
out: parmblk variables filled with all kinds of goodies.
XES_rsrcinit:
This fixes up a resource, if needed, and (most importantly)
corrects some data structures internal to Wind-XES.
C syntax:
xes_rsrcinit(fixflag,scaleflag,treeptr,&xparmblk)
in: WNX_in(0).W = fixup flag... if 0, no fixup of the .RSC is
requested.
WNX_in(1).W = scaling (0 = none, 1 = normal GEM, 2 = perfect fix)
WNX_in(2).L = if WNX_in(0) = 0, ptr to binary resource file.
if WNX_in(0) != 0, ptr to an area of memory that
is identical to a .RSC file on a disk, with the
exception that it already has been fixed up.
out: WNX_out(0).W = number of trees in RSC.
WNX_out(1).L = address of first tree in RSC.
WNX_out(3).L = address of the tree list in RSC.
or: 0 for all WNX_out(0) - WNX_out(3) if failed.
XES_sibling:
The eXtended Environment System's way to identify duplicates of
the same task by their unique i.d's. WNX_in(0) should be a ptr to
the string to search for.
(NOTE: Walk through WNX_secret!)
C syntax:
xes_sibling(&string,&xparmblk)
in: WNX_in(0).L = ptr to 16 byte i.d.
out: WNX_out(0).W = number of matches.
WNX_out(1).L = ptr to tempbuf
XES_inqsibling:
The eXtended Environment System can allow a WNX to pick a sibling
find out information about.
(NOTE: Walk through WNX_secret!)
in: WNX_in(0).L = ptr to 16 byte i.d.
WNX_in(2).W = WNX i.d. number of process to inquire.
out: WNX_out(0).L = pointer to information about WNX.
XES_mesagwrite:
The eXtended Environment System can allow a WNX to write messages
selectively to another WNX process.
C syntax:
xes_mesagwrite(&message,length,&recipientlist,&xparmblk)
in: WNX_in(0).L = pointer to recipient list/ap_id of ACC to send to.
WNX_in(2).W = length of message (up to 256 bytes)
WNX_in(3).L = pointer to message
out: none.
XES_malloc:
A way for a WNX to allocate RAM that will not be affected by
the main application's actions. Under some revisions of TOS, when
a m_alloc is done, if a program is running, its process descriptor
is given to the OS. This circumvents that problem.
C syntax:
xes_malloc(amount,&xparmblk)
in: WNX_in(0).L = amount of RAM to reserve.
out: WNX_out(0).L = address of RAM in the system.
XES_flush:
A WNX can terminate itself.
C syntax:
xes_flush(&xparmblk)
in: none.
out: none.
XES_genv:
Returns a pointer to the vq_extnd parameters in WNX_out(0), and
a ptr to the attributes of the current virtual workstation in
WNX_out(2). This helps in finding out (or modifying) the current
settings of the ST without performing GEM calls.
(NOTE: this is the INQ_TAB area in the Line-A!)
C syntax:
xes_genv(&xparmblk)
in: none.
out: WNX_out(0).L = address of Line-A structure (from DC.W $A000).
WNX_out(2).L = ptr to virtual workstation attributes (45 words).
WNX_out(4).W = screen width (in pixels).
WNX_out(5).W = screen height (in pixels).
WNX_out(6).W = X scale of screen font to 8x8 font.
WNX_out(7).W = Y scale of " " " " " " .
XES_pwindow:
Tells WNX how large (and where!) the parent's Wind-X window is.
C syntax:
xes_pwindow(&xparmblk)
in: none.
out: WNX_out(0).W = x coord of Wind-X window.
WNX_out(1).W = y " " " " .
WNX_out(2).W = width of Wind-X window.
WNX_out(3).W = height of " " .
WNX_out(4).W = x coord of desktop work area.
WNX_out(5).W = y coord of " " " " .
WNX_out(6).W = width of desktop work area.
WNX_out(7).W = height of " " " " .
XES_draw:
The eXtended Environment